<!doctype html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>博客内容页</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .container{
            width: 90%;
            margin: 0 auto;
            background-color: antiquewhite;
        }
        .title{
            text-align: center;
            padding: 10px 0;
            font-size: 36px;
        }
        .post-time{
            text-align: center;
            color: #999aaa;
        }
        .author{
            text-align: center;
            padding: 10px 0;
        }
        .content{
            padding-top: 10px;
            padding-bottom: 10px;
            text-indent: 20px;
        }
        .nav{
            height: 50px;
            background: black;
            color: #fff;
            display: flex;
            align-items: center;   /*垂直居中*/
        }
        .nav-button{
            color: #f3f3f3;
            text-decoration: none;  /*去掉下划线*/
            padding: 0 10px;  /*第一个参数表示上下，第二个参数表示左右*/
        }
        .spacer {
            width: 75%;
        }
        .nav-title{
            padding: 0 15px;
        }
        .nav-author {
            width: 15%;
        }
    </style>
</head>
<body>
<div class="nav">
    <!--  在博客详情页面，显示删除按钮  -->
    <h3 class="nav-title">我的博客系统</h3>
    <div class="spacer"></div>
    <a th:href="${'blogDelete?blogId=' + blog.blogId}" class="nav-button">删除博客</a>
    <a href="blogList" class="nav-button">返回</a>
</div>

<div class="container">
    <h3 th:text="${blog.title}" class="title">这是博客标题</h3>
    <div class="author" th:text="${username}">ZhangYufei</div>
    <div class="post-time" th:text="${blog.postTime}">2021-07-21 21:08:00</div>
    <div class="content" th:text="${blog.content}">
        这是博客正文
        这是博客正文
        这是博客正文
    </div>
</div>
</body>
</html>